package org.fuys.coder.domain.audit.service.publisher;

import org.fuys.coder.domain.audit.model.event.AsyncAuditEvent;
import org.fuys.coder.domain.audit.model.event.AsyncTasksOverEvent;
import org.fuys.coder.domain.substance.model.event.SubstanceReviewEvent;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @projectName: fuys-low-coder
 * @package: org.fuys.coder.domain.audit.service.publisher
 * @className: AsyncAuditEventPublisher
 * @author: WangJing
 * @description: 异步审核事件结束发布者
 * @date: 2024/6/23 17:55
 * @version: 1.0
 */
@Component
public class AsyncAuditEventPublisher  {
    @Resource
    private ApplicationEventPublisher eventPublisher;

    public void publishAuditEvent(AsyncAuditEvent event){
        eventPublisher.publishEvent(event);
    }

    public void publishTaskOverEvent(AsyncTasksOverEvent event){
        eventPublisher.publishEvent(event);
    }

    public void publishSubstanceReviewEvent(SubstanceReviewEvent event){
        eventPublisher.publishEvent(event);
    }
}
